<!DOCTYPE html>
<html>
<head>
    {include file="common/meta" /}
    <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico"/>
    <link href="__CDN__/assets/css/mbti.css" rel="stylesheet">
</head>
<body>
<div class="content">
    <div class="mbti_header">
        <div class="mbti_title">
            测评介绍
        </div>
    </div>
    <div class="evaluate_title">
        {$scene ? $scene.name : $site.name|htmlentities}
    </div>
    <div class="splitdashed" style="margin-top: 10px;"></div>
    <div class="describe">{$scene.describe}</div>
    <div class="splitdashed"></div>
    <div class="mbti_header">
        <div class="mbti_title">
            角色选择
        </div>
    </div>
    <form id="evaluate-form" class="form-horizontal" role="form" method="GET" action="{:url('mbti/evaluate/index')}">
        <input value="{$scene.id}" type="hidden" name="scene_id" />
        <div class="role" style="margin-top: 10px;">
            <div class="role_title">
                昵称
            </div>
            <div class="context">{$usrInfo.nickname}</div>
        </div>
        <div class="role" style="margin-top: 10px;">
            <div class="role_title">
                生日
            </div>
            <input
                class="form-control context"
                id="flatpickr"
                type="text"
                name="birthday"
                placeholder="请选择生日"
                data-format="Y-m-d"
                data-default-date="{:date('Y-m-d 00:00:00', strtotime('-5 years', time()))}"
                data-min-date="{:date('Y-m-d', strtotime('-110 years', time()))}"
                data-max-date="{:date('Y-m-d', strtotime('-5 years', time()))}"
            />
        </div>
        <div class="role" style="margin-top: 10px;">
            <div class="role_title">
                性别
            </div>
            <div class="sex_choose">
                <label for="male" class="sex-item">
                    <img src="__CDN__/assets/img/male.png" class="sex-img" />
                    <div class="sex-name">男生</div>
                    <input id="male" value="male" type="radio" class="sex-checkbox" name="sex" checked />
                </label>
                <label for="female" class="sex-item">
                    <img src="__CDN__/assets/img/female.png" class="sex-img" />
                    <div class="sex-name">女生</div>
                    <input id="female" value="female" type="radio" class="sex-checkbox" name="sex" />
                </label>
            </div>
        </div>
        <div class="btns">
            {if $evaluate_id > 0}
                {if $wx_config}
                <wx-open-launch-weapp
                    id="launch-btn"
                    appid="{$Think.config.site.applet_appid}"
                    path="{$Think.config.site.applet_path}"
                    env-version="{$Think.config.app_debug?'trial':'release'}"
                    style="
                        width: 40%;
                        height: 41px;
                        display: none;
                    "
                >
                    <script type="text/wxtag-template">
                        <style>
                            .open_mp {
                                width: 100%;
                                height: 41px;
                                font-weight: normal;
                                text-align: center;
                                vertical-align: middle;
                                touch-action: manipulation;
                                cursor: pointer;
                                border: none;
                                white-space: nowrap;
                                font-size: 20px;
                                line-height: 41px;
                                border-radius: 21.5px;
                                -webkit-user-select: none;
                                -moz-user-select: none;
                                -ms-user-select: none;
                                user-select: none;
                                color: #fff;
                                background: linear-gradient(270deg, #BE78E8 0%, #EDA9FE 100%);
                            }
                            .open_mp:focus,
                            .open_mp:active:focus,
                            .open_mp.active:focus,
                            .open_mp.focus,
                            .open_mp:active.focus,
                            .open_mp.active.focus {
                                outline: thin dotted;
                                outline: 5px auto -webkit-focus-ring-color;
                                outline-offset: -2px;
                            }
                            .open_mp:hover,
                            .open_mp:focus,
                            .open_mp.focus {
                                text-decoration: none;
                                color: #fff;
                                background: linear-gradient(270deg, #BE78E8 0%, #EDA9FE 100%);
                                border: none;
                            }
                        </style>
                        <button class="open_mp">查看结果</button>
                    </script>
                </wx-open-launch-weapp>
                {/if}
                <a class="btn btns-link" style="width: 40%;" id="show_result" href="javascript:;">
                    查看结果
                </a>
                <button class="btn btns-link" style="width: 40%;background:linear-gradient(90deg, #53E2FF 0%, #4D82FF 100%);" type="submit">
                    <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>重新测试
                </button>
            {else/}
                <button class="btn btns-link" style="width: 100%;" type="submit">
                    开始测试
                </button>
            {/if}
        </div>
    </form>
</div>
<!--
<footer class="footer" style="clear:both;position: fixed;bottom: 0;">
    <p class="copyright">Copyright&nbsp;©&nbsp;{:date("Y")} {$site.name|htmlentities} All Rights Reserved <a href="https://beian.miit.gov.cn" target="_blank">{$site.beian|htmlentities}</a></p>
</footer>
-->
{include file="common/script" /}
</body>
</html>
